package com.codehub.annotation;

import com.codehub.enums.PermissionCodeEnum;
import com.codehub.enums.UserOperFrequencyTypeEnum;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface GlobalInterceptor {
    //是否需要登录
    boolean checkLogin() default false;
    //是否需要校验参数
    boolean checkParams() default false;
    //校验频次
    UserOperFrequencyTypeEnum frequencyType() default UserOperFrequencyTypeEnum.NO_CHECK;
    //权限校验
    PermissionCodeEnum permissionCode() default PermissionCodeEnum.NO_PERMISSION;
}